]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
runDialog: Trim input before processing
authorLucas Werkmeister <mail@lucaswerkmeister.de>
Sun, 7 Feb 2021 18:41:36 +0000 (19:41 +0100)
committerMarge Bot <marge-bot@gnome.org>
Mon, 8 Feb 2021 08:14:46 +0000 (08:14 +0000)
This way, whitespace-only (nonempty) input gets the same treatment of
not being added to the history (see previous commit), which seems nice.

Part of https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3183.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1442>

js/ui/runDialog.js

index b847f0d11b79ef253b0f193e77c33f241f876b81..a01af5c9d5fe7351ee723bb147c4ddeb17b83319 100644 (file)
@@ -178,6 +178,7 @@ class RunDialog extends ModalDialog.ModalDialog {
     }
 
     _run(input, inTerminal) {
+        input = input.trim();
         let command = input;
 
         if (input)